﻿<html DIR="LTR" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" />
    <META NAME="save" CONTENT="history" />
    <title>getFunctionColumns Method (SQLServerDatabaseMetaData)</title>
    
    <link rel="stylesheet" type="text/css" href="../local/Classic.css">
      
    </link>
    
    <script src="../local/script.js">
      
    </script><script src="../local/script_main.js">&amp;nbsp;</script>
  </head>
  <body>
    <!--Topic built:03/05/2009 21:01:45-->

    
    
    
    
    
    
    
    
    
    <div id="header">
      <table width="100%" id="topTable"><tr>
          <td align="left">
            <span id="headerBold">getFunctionColumns Method (SQLServerDatabaseMetaData)</span>
          </td>
          <td align="right">
            
          </td>
        </tr></table>
      
      
      
    </div>
    <div id="mainSection">
      
        
        
		<font color="DarkGray"> </font> <p /> <p />
	
        <div id="introductionSection" class="section">
    <p>Retrieves a description of the specified catalog's system- or user-function parameters and return type. </p>
    <div style="margin: .5em 1.5em .5em 1.5em"><b>Note: </b>
      This feature is introduced starting with the Microsoft SQL Server JDBC Driver version 2.0.<p />
    </div>
  </div><h1 class="heading">Syntax</h1><div id="syntaxSection" class="section"><div class="sampleCode"><span codeLanguage="other"><pre>
public ResultSet <b>getFunctionColumns</b>(java.lang.String <i>catalog</i>,
                       java.lang.String <i>schemaPattern</i>,
                       java.lang.String <i>functionNamePattern</i>
                       java.lang.String <i>columnNamePattern</i>)</pre></span></div><h1 class="heading">Parameters</h1><div id="parametersSection" class="section" name="collapseableSection">
    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">
        <i>catalog</i>
      </p>
      <p xmlns="">A <b>String</b> that contains the catalog name. If it is an empty string "", the result includes the functions without a catalog. If it is <b>null</b>, the catalog name is not used for search.</p>
      <p xmlns="">
        <i>schemaPattern</i>
      </p>
      <p xmlns="">A <b>String</b> that contains the schema name pattern. If it is an empty string "", the result includes the functions without a schema. If it is <b>null</b>, the schema name is not used for search.</p>
      <p xmlns="">
        <i>functionNamePattern</i>
      </p>
      <p xmlns="">A <b>String</b> that contains the name of a function.</p>
      <p xmlns="">
        <i>columnNamePattern</i>
      </p>
      <p xmlns="">A <b>String</b> that contains the name of a parameter.</p>
    </content>
  </div></div><h1 class="heading">Return Value</h1><div id="returnValueSection" class="section" name="collapseableSection">
    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">A <a href="eaffcff1-286c-459f-83da-3150778480c9.htm">SQLServerResultSet</a> object.</p>
    </content>
  </div><h1 class="heading">Exceptions</h1><div id="exceptionsSection" class="section" name="collapseableSection">
    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">
        <a href="af5ef257-7cf6-4db3-b1ee-07d22d82bef1.htm">SQLServerException</a>
      </p>
    </content>
  </div><h1 class="heading">Remarks</h1><div id="remarksSection" class="section" name="collapseableSection">
    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">This <b>getFunctionColumns</b> method is specified by the <b>getFunctionColumns</b> method in the java.sql.DatabaseMetaData interface.</p>
      <p xmlns="">This method returns only the functions and parameters matching the specified schema, function name, and parameter name within the specified catalog.</p>
      <p xmlns="">Each row in the result set includes the following columns for a parameter description, a column description, or a return type:</p>
      <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
            <th>
              Name
            </th>
            <th>
              Type
            </th>
            <th>
              Description
            </th>
          </tr><tr>
          <td>
            <p>FUNCTION_CAT</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>The name of the database in which the function resides.</p>
          </td>
        </tr><tr>
          <td>
            <p>FUNCTION_SCHEM</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>The schema for the function.</p>
          </td>
        </tr><tr>
          <td>
            <p>FUNCTION_NAME</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>The name of the function.</p>
          </td>
        </tr><tr>
          <td>
            <p>COLUMN_NAME</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>The name of a parameter or column.</p>
          </td>
        </tr><tr>
          <td>
            <p>COLUMN_TYPE</p>
          </td>
          <td>
            <p>
              <b>short</b>
            </p>
          </td>
          <td>
            <p>The type of the column. It can be one of the following values:</p>
            <ul><li>
                functionColumnUnknown (0): Unknown type.<br />
              </li><li>
                functionColumnIn (1): Input parameter.<br />
              </li><li>
                functionColumnInOut (2): Input/Output parameter.<br />
              </li><li>
                functionColumnOut (3): Output parameter.<br />
              </li><li>
                functionReturn (4): Function return value.<br />
              </li><li>
                functionColumnResult (5): A parameter or column is a column in the result set.<br />
              </li></ul>
          </td>
        </tr><tr>
          <td>
            <p>DATA_TYPE</p>
          </td>
          <td>
            <p>
              <b>int</b>
            </p>
          </td>
          <td>
            <p>The SQL data type value from <b>Java.sql.Types</b>.</p>
          </td>
        </tr><tr>
          <td>
            <p>TYPE_NAME</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>The name of the data type.</p>
          </td>
        </tr><tr>
          <td>
            <p>PRECISION</p>
          </td>
          <td>
            <p>
              <b>int</b>
            </p>
          </td>
          <td>
            <p>The total number of significant digits.</p>
          </td>
        </tr><tr>
          <td>
            <p>LENGTH</p>
          </td>
          <td>
            <p>
              <b>int</b>
            </p>
          </td>
          <td>
            <p>The length of the data in bytes.</p>
          </td>
        </tr><tr>
          <td>
            <p>SCALE</p>
          </td>
          <td>
            <p>
              <b>short</b>
            </p>
          </td>
          <td>
            <p>The number of digits to the right of the decimal point.</p>
            <p>
            </p>
          </td>
        </tr><tr>
          <td>
            <p>RADIX</p>
          </td>
          <td>
            <p>
              <b>short</b>
            </p>
          </td>
          <td>
            <p>The base for numeric types.</p>
          </td>
        </tr><tr>
          <td>
            <p>NULLABLE</p>
          </td>
          <td>
            <p>
              <b>short</b>
            </p>
          </td>
          <td>
            <p>Indicates if the parameter or return value can contain a <b>null</b> value. </p>
            <p> It can be one of the following values:</p>
            <ul><li>
                functionNoNulls (0): NULL value is not allowed.<br />
              </li><li>
                functionNullable (1): NULL value is allowed.<br />
              </li><li>
                functionNullableUnknown (2): Unknown.<br />
              </li></ul>
          </td>
        </tr><tr>
          <td>
            <p>REMARKS</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>The comments about a column or a parameter.</p>
          </td>
        </tr><tr>
          <td>
            <p>COLUMN_DEF</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>The default value of the column.</p>
            <div style="margin: .5em 1.5em .5em 1.5em"><b>Note: </b>
              This information is available with SQL Server and is JDBC driver-specific.<p />
            </div>
          </td>
        </tr><tr>
          <td>
            <p>SQL_DATA_TYPE</p>
          </td>
          <td>
            <p>
              <b>short</b>
            </p>
          </td>
          <td>
            <p>This column is the same as the <b>DATA_TYPE</b> column, except for the <b>datetime</b> and ISO <b>interval</b> data types.</p>
            <div style="margin: .5em 1.5em .5em 1.5em"><b>Note: </b>
              This information is available with SQL Server and is JDBC driver-specific.<p />
            </div>
          </td>
        </tr><tr>
          <td>
            <p>SQL_DATETIME_SUB</p>
          </td>
          <td>
            <p>
              <b>short</b>
            </p>
          </td>
          <td>
            <p>The <b>datetime</b> ISO <b>interval</b> subcode if the value of <b>SQL_DATA_TYPE</b> is <b>SQL_DATETIME</b> or <b>SQL_INTERVAL</b>. For data types other than <b>datetime</b> and ISO <b>interval</b>, this column is NULL.</p>
            <div style="margin: .5em 1.5em .5em 1.5em"><b>Note: </b>
              This information is available with SQL Server and is JDBC driver-specific.<p />
            </div>
          </td>
        </tr><tr>
          <td>
            <p>CHAR_OCTET_LENGTH</p>
          </td>
          <td>
            <p>
              <b>int</b>
            </p>
          </td>
          <td>
            <p>The maximum length of binary and character based parameters or columns. For other data types, it is NULL.</p>
          </td>
        </tr><tr>
          <td>
            <p>ORDINAL_POSITION</p>
          </td>
          <td>
            <p>
              <b>int</b>
            </p>
          </td>
          <td>
            <p>For input and output parameters, it represents the position starting from 1. </p>
            <p>For result set columns, it is the position of the column in the result set starting from 1.</p>
            <p>For return value, it is 0.</p>
          </td>
        </tr><tr>
          <td>
            <p>IS_NULLABLE</p>
          </td>
          <td>
            <p>
              <b>String</b>
            </p>
          </td>
          <td>
            <p>Determines the nullability of a parameter or column.</p>
            <p>It can be one of the following values:</p>
            <p>
              <b>YES</b>: The parameter or column can include NULL values.</p>
            <p>
              <b>NO</b>: The parameter or column can not include NULL values.</p>
            <p>Empty string (""): Unknown.</p>
          </td>
        </tr><tr>
          <td>
            <p>SS_DATA_TYPE</p>
          </td>
          <td>
            <p>
              <b>short</b>
            </p>
          </td>
          <td>
            <p>The SQL Server data type that is used by extended stored procedures.</p>
            <p>
              <b>Note</b>   For more information about the data types returned by SQL Server, see "Data Types (Transact-SQL)" in SQL Server Books Online.</p>
          </td>
        </tr></table>
    </content>
  </div><span id="seeAlsoSpan"><h1 class="heading">See Also</h1></span><div id="seeAlsoSection" class="section" name="collapseableSection"><a href="8b8049d0-8c6d-4476-866b-098709f37eec.htm">SQLServerDatabaseMetaData Class</a><br /><a href="772de447-c922-4b85-8e10-5f0d9277966c.htm">SQLServerDatabaseMetaData Methods</a><br /><a href="327ba0bc-438a-494c-b119-1cd4a096bb58.htm">SQLServerDatabaseMetaData Members</a><br /><br /></div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/><tool:tip element="roleInfoSpan" avoidmouse="false"/>
		<![endif]-->
      <div id="footer" class="section">
        
		<hr />
		
		<span id="fb" class="feedbackcss">
			
			
		</span>
		
		<a href="9bad553b-9e70-4696-8499-2e35f772a1e0.htm">
			
			© 2009 Microsoft Corporation. All rights reserved.
		</a>
 	
	
      </div>
    </div>
  </body>
</html>